using UnityEngine;
using System.Collections;

public class MonsterCollider : MonoBehaviour {

//	public Vector3 
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnCollisionEnter( Collision collisionInfo )
	{
		GameObject gObject = collisionInfo.gameObject;
		if( gObject.tag == "Enemy" )
		{
			PlayerState playerState = GetComponent<PlayerState>();
			if( playerState!=null )
			{
				this.transform.position = playerState.respawnPos;
			}
		}
	}
	
}
